package com.guan.ordering_sys.generator.controller;


import com.guan.ordering_sys.common.ResultApi;
import com.guan.ordering_sys.generator.service.impl.GoodsTypeServiceImpl;
import com.guan.ordering_sys.vo.GoodsTypeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 关远键
 * @since 2021-06-18
 */
@Api(tags = "商品类型控制器")
@RestController
@RequestMapping("/api/goods-type")
public class GoodsTypeController {

    @Autowired
    private GoodsTypeServiceImpl goodsTypeService;

    @ApiOperation("商品类型")
    @GetMapping("/getAll")
    public ResultApi getAll() {
        List<GoodsTypeVo> list = goodsTypeService.getAll();
        return ResultApi.success(list);
    }

}

